package com.lw.entity;

import com.lw.common.vo.BasePageQuery;
import com.mybatisflex.annotation.Column;
import com.mybatisflex.annotation.Id;
import com.mybatisflex.annotation.KeyType;
import com.mybatisflex.annotation.Table;

import java.io.Serial;
import java.io.Serializable;
import java.time.LocalDateTime;


import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;

/**
 * 字典项表 实体类。
 *
 * @author lw
 * @since 2025年05月17日 07:58:04
 */
@EqualsAndHashCode(callSuper = true)
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Schema(description = "字典项表")
@Table("tb_dict_item")
public class TbDictItem extends BasePageQuery implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

    /**
     * 主键
     */
    @Id(keyType = KeyType.Auto)
    @Schema(description = "主键")
    private Long id;

    /**
     * 关联字典编码，与tb_dict表中的dict_code对应
     */
    @Schema(description = "关联字典编码，与tb_dict表中的dict_code对应")
    private String dictCode;

    /**
     * 字典项值
     */
    @Schema(description = "字典项值")
    private String value;

    /**
     * 字典项标签
     */
    @Schema(description = "字典项标签")
    private String label;

    /**
     * 标签类型，用于前端样式展示（如success、warning等）
     */
    @Schema(description = "标签类型，用于前端样式展示（如success、warning等）")
    private String tagType;

    /**
     * 状态（1-正常，0-禁用）
     */
    @Schema(description = "状态（1-正常，0-禁用）")
    private Boolean status;

    /**
     * 排序
     */
    @Schema(description = "排序")
    private Integer sort;

    /**
     * 备注
     */
    @Schema(description = "备注")
    private String remark;

    /**
     * 创建时间
     */
    @Schema(description = "创建时间")
    @Column(onInsertValue = "now()")
    private LocalDateTime createTime;

    /**
     * 创建人ID
     */
    @Schema(description = "创建人ID")
    private Long createBy;

    /**
     * 更新时间
     */
    @Schema(description = "更新时间")
    @Column(onUpdateValue = "now()")
    private LocalDateTime updateTime;

    /**
     * 修改人ID
     */
    @Schema(description = "修改人ID")
    private Long updateBy;

}
